﻿<UserControl x:Class="ZFCNew.Views.TeamView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ViewModels="clr-namespace:ZFCNew.ViewModels" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Height="660" Width="997">
    <UserControl.Resources>
        <ViewModels:TeamModel x:Key="TeamModelDataSource" />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource TeamModelDataSource}}">
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="Click" SourceObject="{Binding ElementName=NextMatchBtn}">
                <i:InvokeCommandAction Command="{Binding GetNextMatchCommand}"/>
            </i:EventTrigger>
            <i:EventTrigger EventName="Click" SourceObject="{Binding ElementName=AllMatchesBtn}">
                <i:InvokeCommandAction Command="{Binding GetAllMatchesCommand}"/>
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <Grid x:Name="TeamHolder" Height="670" VerticalAlignment="Top" Margin="0" DataContext="{Binding Teams}">
    		<RadioButton DataContext="{Binding [0]}" IsChecked="True" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource TeamMenuStyle}" Width="75" Height="75" Margin="267,233,0,0">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/0.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [1]}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Style="{StaticResource TeamMenuStyle}" Width="75" Height="75" Margin="314,0,0,117">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/1.png"/>
    			</RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [2]}" VerticalAlignment="Top" Style="{StaticResource TeamMenuStyle}" Height="75" Margin="396,143,0,0" Width="75" HorizontalAlignment="Left" d:LayoutOverrides="Width">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/2.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [3]}" HorizontalAlignment="Left" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="188,143,0,0" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/3.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [4]}" HorizontalAlignment="Left" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="32,0,0,24" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/4.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [5]}" HorizontalAlignment="Right" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="0,0,313,212" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/5.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [6]}" HorizontalAlignment="Left" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="209,0,0,157" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/6.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [7]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,406,253" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Bottom" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/7.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [8]}" Style="{StaticResource TeamMenuStyle}" Margin="308,0,0,230" Width="75" HorizontalAlignment="Left" d:LayoutOverrides="Width" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/8.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [9]}" HorizontalAlignment="Left" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="323,0,0,13" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/9.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [10]}" Style="{StaticResource TeamMenuStyle}" Margin="365,233,0,0" Height="75" HorizontalAlignment="Left" Width="75" VerticalAlignment="Top" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/10.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [11]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,240,24" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Bottom" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/11.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [12]}" HorizontalAlignment="Right" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="0,13,276,0" Height="75" VerticalAlignment="Top">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/12.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [13]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,407,152" Height="75" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/13.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [14]}" Style="{StaticResource TeamMenuStyle}" Margin="490,39,432,0" Height="75" VerticalAlignment="Top">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/14.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [15]}" Style="{StaticResource TeamMenuStyle}" Margin="439,0,483,33" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/15.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [16]}" Style="{StaticResource TeamMenuStyle}" Margin="0,272,315,323" HorizontalAlignment="Right" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/16.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [17]}" Style="{StaticResource TeamMenuStyle}" Margin="369,50,0,0" Height="75" VerticalAlignment="Top" HorizontalAlignment="Left" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/17.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [18]}" Style="{StaticResource TeamMenuStyle}" Margin="169,263,0,332" Width="75" Height="75" HorizontalAlignment="Left" d:LayoutOverrides="Width">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/18.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [19]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,319,111" Height="75" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/19.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [20]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,374,25" Height="75" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/20.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [21]}" HorizontalAlignment="Left" Style="{StaticResource TeamMenuStyle}" Width="75" Margin="124,0,0,93" Height="75" VerticalAlignment="Bottom">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/21.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [22]}" Style="{StaticResource TeamMenuStyle}" Margin="298,129,0,0" Height="75" VerticalAlignment="Top" HorizontalAlignment="Left" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/22.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [23]}" Style="{StaticResource TeamMenuStyle}" Margin="0,154,418,0" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/23.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [24]}" Style="{StaticResource TeamMenuStyle}" Margin="0,80,340,0" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/24.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [25]}" Style="{StaticResource TeamMenuStyle}" Margin="475,244,447,0" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/25.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [26]}" Style="{StaticResource TeamMenuStyle}" Margin="0,172,320,0" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/26.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [27]}" Style="{StaticResource TeamMenuStyle}" Margin="209,0,0,25" Height="75" VerticalAlignment="Bottom" d:LayoutOverrides="Height" HorizontalAlignment="Left" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/27.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [28]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,37,44" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Bottom" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/28.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [29]}" Style="{StaticResource TeamMenuStyle}" Margin="406,327,0,268" HorizontalAlignment="Left" Width="75">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/29.png"/>
                </RadioButton.Background>
    		</RadioButton>
            <RadioButton DataContext="{Binding [30]}" Style="{StaticResource TeamMenuStyle}" Margin="425,0,497,155" Height="75" VerticalAlignment="Bottom" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/30.png"/>
                </RadioButton.Background>
    		</RadioButton>
    		<RadioButton DataContext="{Binding [31]}" Style="{StaticResource TeamMenuStyle}" Margin="0,0,136,26" HorizontalAlignment="Right" Width="75" Height="75" VerticalAlignment="Bottom" d:LayoutOverrides="Height">
    			<RadioButton.Background>
                    <ImageBrush Stretch="UniformToFill" ImageSource="../Resources/Flags/31.png" />
                </RadioButton.Background>
    		</RadioButton>
    	</Grid>
    	<Border BorderBrush="Red" BorderThickness="2,2,0,2" HorizontalAlignment="Right" Height="397" VerticalAlignment="Top" Width="297" Margin="0,94,10,0" DataContext="{Binding SelectedTeam}" CornerRadius="10">
    		<Grid>
                
                <TextBlock Text="{Binding Name, FallbackValue=Uruguay}" VerticalAlignment="Top" Foreground="White" FontFamily="Franklin Gothic Heavy" TextAlignment="Center" FontSize="26.667" Opacity="0.7"/>
    			<Image VerticalAlignment="Top" Source="{Binding Id, Converter={StaticResource TeamIdToFlagConverter}, FallbackValue=../Resources/Flags/0.png}" MaxWidth="151" MaxHeight="80" Margin="12,40,0,0" HorizontalAlignment="Left"/>
    			<TextBlock TextWrapping="Wrap" Text="Group:" VerticalAlignment="Top" FontSize="21.333" Foreground="#FFFFC700" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Center" Margin="0,131,0,0" Visibility="Collapsed"/>
    			<TextBlock TextWrapping="Wrap" Text="{Binding Group, FallbackValue=A}" VerticalAlignment="Top" FontSize="21.333" Foreground="#FFFFC700" FontFamily="Franklin Gothic Heavy" Margin="0,131,95,0" HorizontalAlignment="Right" Visibility="Collapsed"/>
    			<StackPanel VerticalAlignment="Top" Margin="10,170,0,0" HorizontalAlignment="Left">
    				<TextBlock
    					TextWrapping="Wrap" Text="Played:" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock
    					TextWrapping="Wrap" Text="Won:" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="Draw:" VerticalAlignment="Top" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="Lost:" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="Goal For:" VerticalAlignment="Top" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="Goal Against:" VerticalAlignment="Top" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="Points:" VerticalAlignment="Top" Foreground="#FF555555" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    			</StackPanel>
    			<StackPanel VerticalAlignment="Top" Margin="0,170,95,0" HorizontalAlignment="Right">
    				<TextBlock TextWrapping="Wrap" Text="{Binding MP, FallbackValue=0}" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="{Binding W, FallbackValue=0}" VerticalAlignment="Top" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="{Binding D, FallbackValue=0}" VerticalAlignment="Top" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="{Binding L, FallbackValue=0}" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="{Binding GF, FallbackValue=0}" VerticalAlignment="Top" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="{Binding GA, FallbackValue=0}" VerticalAlignment="Top" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    				<TextBlock TextWrapping="Wrap" Text="{Binding Pts, FallbackValue=0}" VerticalAlignment="Top" Foreground="Red" FontFamily="Franklin Gothic Heavy" HorizontalAlignment="Left" FontSize="21.333" Margin="0,5,0,0"/>
    			</StackPanel>
    			<HyperlinkButton Content="{Binding Group, Converter={StaticResource GroupNameConverter}, FallbackValue=Group: A}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,133,0,0" Style="{StaticResource LinkWithoutBorderStyle}" FontSize="21.333" Foreground="#FFFFC700" Click="OpenGroupStanding"/>
    		</Grid>
    	</Border>
    	<HyperlinkButton  Content="Next match" x:Name="NextMatchBtn" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,15,136" Style="{StaticResource LinkWithoutBorderStyle}" Foreground="#FFFFC700" FontSize="18.667"/>
    	<HyperlinkButton Content="All matches" x:Name="AllMatchesBtn" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,181,136" Style="{StaticResource LinkWithoutBorderStyle}" Foreground="#FFFFC700" FontSize="18.667"/>

    </Grid>
</UserControl>
